package com.android.plc.classholder;

public class Device extends BasicItem
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 3152419472316369072L;
	public String name;
	public int device_type;
	public int sub_type;
	public int room;
	public int code;
	public String type_name;
	public String room_name;

	public Device(Type type)
	{
		super(type);
	}

	public Device(Device d)
	{
		super(d.type);
		this.name = d.name;
		this.device_type = d.device_type;
		this.sub_type = d.sub_type;
		this.code = d.code;
		this.room = d.room;
	}

	public Device(String name, int type, int subtype, int code, int room)
	{
		super(Type.NORMAL_ITEM);
		this.name = name;
		this.device_type = type;
		this.sub_type = subtype;
		this.code = code;
		this.room = room;
	}

	@Override
	public String toString()
	{
		return super.toString() == null ? this.name : super.toString();
	}
}
